package ClientBlackBoxTesting;

import java.io.IOException;

import serverComuncation.MultipleClientProtocolServer;

import org.junit.Before;
import org.junit.Test;

public class ClientTests extends ClientRunning{
	
	@Test
	public void testLoginWithoutRegisteredUser() {
		clientNewInputTest("ClientAutoTests/test.txt");
	//should be failed - user name and password are unknown	
	}
	
	@Test
	public void testloginWithusername() {
		clientNewInputTest("ClientAutoTests/register.txt");
	//success - registration of "username" with "pass" 
	}
	
	@Test
	public void testViewForums() {
		clientNewInputTest("ClientAutoTests/viewSubForum.txt");
	//success + exit from server - view sub forum and than choose "exit"	
	}
	
	@Test
	public void testexit() {
		clientNewInputTest("ClientAutoTests/exit.txt");
		//should exit 
	}
	
	@Test
	public void testviewForunAndSubForumWithoutRegistration() {
		clientNewInputTest("ClientAutoTests/viewForunAndSubForumWithoutRegistration.txt");
		//should watch forum with his sub forum
	}
	
	@Test
	public void loginAfterRegistration() {
		clientNewInputTest("ClientAutoTests/loginAfterRegistration.txt");
	//should success login after registration	
	}
	
	@Test
	public void testaddPostAfterRegistration() {
		clientNewInputTest("ClientAutoTests/addPostAfterRegistration.txt");
	//register with "users" and "passw" viewsubforum ,view sport, add post "added" with body "body" and than logout	
	}
	
	@Test
	public void testCheck1() {
		clientNewInputTest("ClientAutoTests/check1.txt");
		//view forum, try to login with"usr" and "ps" without registration, than register with  "usr" and "ps"
		//than watch forum and sub forum
	}
	
	@Test
	public void testCheck2() {
		clientNewInputTest("ClientAutoTests/check2.txt");
		//register with user "ani" and password "ata" than choose view forums, view sub forum sport,than choose add subject "sub", body "bod" 
		//- should return success with thread list 1:sub..
	}
	
}
